<%-- 
    Document   : mineObjekter
    Created on : 26.sep.2012, 17:22:17
    Author     : 500134
--%>
<%@include file="WEB-INF/jspf/header.jspf"%>
<%@page import="java.util.ArrayList"%>
<%@page contentType="text/html" pageEncoding="ISO-8859-1"%>
<!DOCTYPE html>
<%
ArrayList<String> mineObjekter;
mineObjekter = db.DatabaseKobling.getHouseholdArticle(request.getSession().getAttribute("username").toString());
%>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 
        <script type="text/javascript">
            function myfunction() {
                var objekt = document.getElementById('obj').value
                var link = "editObjekt.jsp?oName="+objekt;
                window.location = link;
            }
        </script>
    </head>
    <body>
            <h3>${message}</h3>
        <% request.getSession().removeAttribute("message"); %>
        <h2>Mine objekter</h2>
        <div class="objekt_area">
            <div class="objekt_box">
                <form>
                    <Select id="obj" size="<%=mineObjekter.size()%>" onclick="myfunction()">
                    <% for (int i = 0; i < mineObjekter.size(); i++)                              
                     out.print("<option>" + mineObjekter.get(i) + "</option>");  %>
                </Select>
            </form>
            </div>
        </div>
    </body>
</html>
<%@include file="WEB-INF/jspf/footer.jspf"%>